<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="root">
			<h2>事件处理{{name + '!'}}</h2>
			<button type="button" @click="show">点我提示信息</button><br />
			<button type="button" @click="show2(66)">点击提示信息</button>
		</div>
		<script type="text/javascript">
			var app = new Vue({
				el:"#root",
				data: {
					name:'开始',
				},
				methods:{
					show(){
						// console.log(this);
						alert("啊哈");
					},
					show2(number){
						console.info(number);
						// alert("啊哈");
					},
				}
			})
		</script>
	</body>
</html>
